package com.xw.childhealth.service.impl;

import com.xw.childhealth.dao.HealthGuidanceDao;
import com.xw.childhealth.entity.HealthGuidance;
import com.xw.childhealth.service.HealthGuidanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description:
 * @Author: y
 * @CreateDate: 2019-11-13 09:08
 * @Version: 1.0
 */
@Service
public class HealthGuidanceServiceImpl implements HealthGuidanceService {

    @Autowired
    private HealthGuidanceDao healthGuidanceDao;

    @Override
    public List<HealthGuidance> findByParentIdEquals(Integer id) {
        return healthGuidanceDao.findByParentIdEquals(id);
    }

    @Override
    public HealthGuidance findByIdEquals(Integer id) {
        return healthGuidanceDao.findByIdEquals(id);
    }

    @Override
    public HealthGuidance save(HealthGuidance healthGuidance) {
        return healthGuidanceDao.save(healthGuidance);
    }

    @Override
    public void delRecord(Integer id) {
        healthGuidanceDao.deleteById(id);
    }
}
